package com.rankeiot.core.data;

import org.springframework.context.i18n.LocaleContextHolder;

public interface LocalizedMessage {
    String getEn();
    String getZh();
    default String toStr(){
        String lang = LocaleContextHolder.getLocale().getLanguage();
        if(lang.startsWith("zh")){
            return getZh();
        }else{
            return getEn();
        }
    }
}
